.el-switch {
  height: 22px;
  width: 44px;
  border-radius: 11px;
  border-color: @switch-false-color;
  &.is-checked {
    border-color: @switch-true-color;
    .el-switch__core {
      border-color: @switch-true-color;
      background-color: @switch-true-color;
      &:after {
        margin-left: -19px;
      }
    }
  }
  &.is-disabled {
    opacity: 1;
    .el-switch__core {
      border-color: @switch-disabled-color;
      background-color: @switch-disabled-color;
      &:after {
        background: #fafafa;
        z-index: 2;
      }
    }
    &.is-checked{
      border-color: @switch-true-color;
      opacity: 0.35;
      .el-switch__core {
        border-color: @switch-true-color;
        background-color: @switch-true-color;
      }
    }
  }
  .el-switch__core {
    padding: 0 1px;
    box-sizing: content-box;
    border-radius: 11px;
    border-color: @switch-false-color;
    background-color: @switch-false-color;
    &:after {
      width: 18px;
      height: 18px;
    }
  }
  &[show-text] {
    &:before {
      content: '开';
      color: #fff;
      position: absolute;
      left: 7px;
      font-size: 12px;
      z-index: 2;
    }
    &:after {
      content: '关';
      color: #fff;
      position: absolute;
      right: 7px;
      font-size: 12px;
    }
  }

  &[size="mini"] {
    width: 28px;
    .el-switch__core {
      height: 14px;
      &:after {
        width: 12px;
        height: 12px;
      }
    }
    &.is-checked {
      .el-switch__core:after {
        margin-left: -13px;
      }
    }
  }
}
